import { DEFAULT_LAYOUT, PAGE_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const PLAT_DEV_OPS: AppRouteRecordRaw = {
  path: '/plat-dev-ops',
  name: 'PlatDevOps',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: '运维中心',
    requiresAuth: true,
    icon: 'icon-dashboard',
    order: 0,
  },
  children: [
    {
      path: '/plat-dev-ops-conf',
      name: 'PlatDevOpsConf',
      component: PAGE_LAYOUT,
      meta: {
        locale: '配置管理',
        requiresAuth: true,
        icon: 'icon-dashboard',
        order: 0,
      },
      children: [
        {
          path: '/plat-dev-ops-conf-dict',
          name: 'PlatDevOpsConfDict',
          component: () => import('@/views/plat/dev-ops/conf/dict/index.vue'),
          meta: {
            locale: '字典配置',
            requiresAuth: true,
            roles: ['*'],
          },
        },
        {
          path: '/plat-dev-ops-conf-edition',
          name: 'PlatDevOpsConfEdition',
          component: () => import('@/views/plat/dev-ops/conf/edition/index.vue'),
          meta: {
            locale: '版本配置',
            requiresAuth: true,
            roles: ['*'],
          },
        },
        {
          path: '/plat-dev-ops-conf-perm',
          name: 'PlatDevOpsConfPerm',
          component: () => import('@/views/plat/dev-ops/conf/perm/index.vue'),
          meta: {
            locale: '权限配置',
            requiresAuth: true,
            roles: ['*'],
          },
        },
        {
          path: '/plat-dev-ops-conf-third',
          name: 'PlatDevOpsConfThird',
          component: () => import('@/views/plat/dev-ops/conf/third/index.vue'),
          meta: {
            locale: '第三方平台配置',
            requiresAuth: true,
            roles: ['*'],
          },
        },
      ],
    },
  ],
};

export default PLAT_DEV_OPS;
